﻿using System;
using System.ServiceModel;
using Common;
using DevExpress.Xpo.DB;

namespace Client
{
    /// <summary>
    /// ClientBase for IDataStoreContract
    /// </summary>
    public partial class DataStoreContractClient : ClientBase<IDataStoreContract>, IDataStoreContract
    {

        /// <summary>
        /// Initializes a new instance of the <see cref="DataStoreContractClient"/> class.
        /// </summary>
        public DataStoreContractClient()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataStoreContractClient"/> class.
        /// </summary>
        /// <param name="endpointConfigurationName">Name of the endpoint configuration.</param>
        public DataStoreContractClient(string endpointConfigurationName) :
            base(endpointConfigurationName)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataStoreContractClient"/> class.
        /// </summary>
        /// <param name="endpointConfigurationName">Name of the endpoint configuration.</param>
        /// <param name="remoteAddress">The remote address.</param>
        public DataStoreContractClient(string endpointConfigurationName, string remoteAddress) :
            base(endpointConfigurationName, remoteAddress)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataStoreContractClient"/> class.
        /// </summary>
        /// <param name="endpointConfigurationName">Name of the endpoint configuration.</param>
        /// <param name="remoteAddress">The remote address.</param>
        public DataStoreContractClient(string endpointConfigurationName, EndpointAddress remoteAddress) :
            base(endpointConfigurationName, remoteAddress)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="DataStoreContractClient"/> class.
        /// </summary>
        /// <param name="binding">The binding.</param>
        /// <param name="remoteAddress">The remote address.</param>
        public DataStoreContractClient(System.ServiceModel.Channels.Binding binding, EndpointAddress remoteAddress) :
            base(binding, remoteAddress)
        {
        }

        /// <summary>
        /// Gets the auto create option.
        /// </summary>
        /// <returns></returns>
        public AutoCreateOption GetAutoCreateOption()
        {
            return base.Channel.GetAutoCreateOption();
        }

        /// <summary>
        /// Modifies the data.
        /// </summary>
        /// <param name="dmlStatements">The DML statements.</param>
        /// <returns></returns>
        public ModificationResult ModifyData(ModificationStatement[] dmlStatements)
        {
            return base.Channel.ModifyData(dmlStatements);
        }

        /// <summary>
        /// Selects the data.
        /// </summary>
        /// <param name="selects">The selects.</param>
        /// <returns></returns>
        public SelectedData SelectData(SelectStatement[] selects)
        {
            return base.Channel.SelectData(selects);
        }

        /// <summary>
        /// Updates the schema.
        /// </summary>
        /// <param name="dontCreateIfFirstTableNotExist">if set to <c>true</c> [dont create if first table not exist].</param>
        /// <param name="tables">The tables.</param>
        /// <returns></returns>
        public UpdateSchemaResult UpdateSchema(bool dontCreateIfFirstTableNotExist, DBTable[] tables)
        {
            return base.Channel.UpdateSchema(dontCreateIfFirstTableNotExist, tables);
        }
    }
}
